<?php
ini_set("max_execution_time","0");

include "api/LbsApiBasic.class.php";
include "api/LbsService.class.php";
include "api/LbsTrack.class.php";
include "api/LbsConf.class.php";
include "api/LbsRelation.class.php";
include "api/LbsAttribute.class.php";
echo "<pre>";
/**
 * service 接口测试
 */
$service_id = 101408;
$service = new LbsService($service_id);

//$service->update($service_id,'serviceTest03','test update');
//$response = $service->getResponse();
//print_r($response);

//$service->detail($service_id);
//$response = $service->getResponse();
//print_r($response);

//$service->delete($service_id);
//$response = $service->getResponse();


$track = new LbsTrack($service_id);
for($i=0;$i<10000;$i++){
	$data = array();
	$data['latitude'] = 45.121+$i*0.001;
	$data['longitude'] = 33.411+$i*0.001;
	$data['coord_type'] = 1;
	$data['loc_time'] = time();
	$data['track_name'] = "track_".$i;
	$data['direction'] = 1;
	$data['speed'] = 2;
	$data['user_info'] = 1;
	$data['power'] = 93;
	$data['dispatch_state'] = '完成';
	$data['radius'] = 50;
	$data['chipno'] = 1;
	$track_id = $track->create($data);
}

//$data = $track->trackList(array('Track_ids'=>'1304714209,1304717183,1304721526','return_type'=>0));
//print_r($data);

//$data = $track->trackList(array('track_name'=>'101408','return_type'=>0));
//$response = $track->getResponse();
//print_r($response);
?>